<?php
include_once ("../../config.php");
?>
  



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include_once(ROOT_PATH_.'/controlbase/modules/head.php'); ?>
</head>

<body>
 




<?php


$new_name         = addslashes($_REQUEST['name']);
$new_departmentid = addslashes($_REQUEST['departmentid']);
$new_cost         = addslashes($_REQUEST['cost']);
$new_status       = addslashes($_REQUEST['status']);
$new_applydate    = addslashes($_REQUEST['applydate']);
$new_classify     = addslashes($_REQUEST['classify']);
$new_remark       = addslashes($_REQUEST['remark']);
$ip               = $_SERVER["REMOTE_ADDR"];
$new_authur       = $_SESSION['userid'];


//设置需要搜索的表格的前缀后缀
$table = "finance";
//设置需要搜索的表格的前缀后缀



$sql = "INSERT INTO $table (
name,
departmentid,
cost,
status,
applydate,
classify,
authur,
ip,
remark
)

value (
'$new_name',
'$new_departmentid',
'$new_cost',
'$new_status',
'$new_applydate',
'$new_classify',
'$new_authur',
'$ip',
'$new_remark'
)";


$query = mysql_query($sql) or die ('添加数据失败！！');


mysql_close($con);

 
?>





<script type="text/javascript">
    alert("输入信息已保存，点击确认返回继续操作.");
    document.location.href = "detail-list.php?nav-itemed=finance";
</script>
</body>